<template>
	<view>
		<view class="header">
			<view class="back" @click="goBack">
				<van-icon name="arrow-left" color="#157ef9" />
				<text>返回</text>
			</view>
			<view class="title">收入纳税明细详情</view>
			<view class="handle"></view>
		</view>
		<view class="main">
			<view class="tip">
				温馨提示：税款计算采用累计计税方式，累计收入与扣除详情数据已包括本期数据。此处数据为扣缴单位为您申报的数据，如有异议，请联系您的单位处理。
			</view>
			<cu-card title="累计收入与扣除详情">
				<template v-slot:region>
					<view class="cell-group">
						<view class="cell">
							<view class="cell-left">
								累计收入：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								累计免税收入：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								累计减除费用：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								累计专项扣除：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								累计专项附加扣除：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								累计其他扣除：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								累计个人养老金：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								累计准予扣除的捐赠额：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
					</view>
				</template>
				<template #amount>
					<view class="amount">
						<view class="left">累计应纳税所得额：</view>
						<view class="right">3432432.43元</view>
					</view>
				</template>
			</cu-card>
			<cu-card title="税款计算">
				<template v-slot:region>
					<view class="cell-group">
						<view class="cell">
							<view class="cell-left">
								累计应纳税所得额：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								税率/预扣率：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								速算扣除数：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								累计应纳税额：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								累计已缴税额：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
						<view class="cell">
							<view class="cell-left">
								累计减免税额：
							</view>
							<view class="cell-right">
								190000.00元
							</view>
						</view>
					</view>
				</template>
				<template #amount>
					<view class="amount">
						<view class="left">本期申报税额：</view>
						<view class="right">3432432.43元</view>
					</view>
				</template>
			</cu-card>
			<view class="handle">
				<span @click="showExplain">查看政策说明</span>
			</view>
		</view>
	</view>
</template>

<script setup lang='ts'>
	const goBack = () => {
		uni.redirectTo({
			url: "/pages/detail/detail"
		})
	}
	const showExplain = () => {
		uni.navigateTo({
			url: "/pages/detail/explain"
		})
	}
</script>

<style scoped lang='scss'>
	.header {
		width: 100%;
		position: fixed;
		top: 0;
		left: 0;
		background-color: #fff;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0rpx 32rpx;
		box-sizing: border-box;
		height: 88rpx;
		z-index: 999;

		.back {
			display: flex;
			align-items: center;

			text {
				font-size: 28rpx;
				color: #157ef9;
			}
		}

		.title {
			font-size: 32rpx;
			font-weight: bold;
		}

		.handle {
			font-size: 28rpx;
			color: #157ef9;
		}
	}

	.main {
		position: relative;
		top: 88rpx;
		padding-bottom: 200rpx;

		.tip {
			width: 100%;
			background-color: #ebf4fd;
			padding: 20rpx 32rpx;
			box-sizing: border-box;
			font-size: 24rpx;
			color: #333;
		}

		.cell-group {
			padding-bottom: 20rpx;

			.cell {
				width: 100%;
				display: flex;
				justify-content: space-between;
				align-items: flex-start;
				padding: 20rpx 32rpx 0rpx 32rpx;
				box-sizing: border-box;
				font-size: 28rpx;

				.cell-left {
					color: #99989e;
					width: 35%;
				}

				.cell-right {
					color: #343434;
					width: 60%;
					text-align: right;

				}
			}

			.show-count {
				display: flex;
				justify-content: flex-end;
				align-items: center;
				color: #157ef9;
				padding: 20rpx 32rpx 0rpx 32rpx;
				box-sizing: border-box;
				font-size: 28rpx;
			}

			.collapse-title {
				color: #99989e;
			}

			.collapse-val {
				color: #343434;
			}

			.collapse-content {
				display: flex;
				justify-content: space-between;
				background-color: #f9fafd;
				padding: 20rpx 68rpx 20rpx 64rpx;
				box-sizing: border-box;

				&:last-child {
					padding-bottom: 20rpx;
				}

				.collapse-content-left {
					color: #99989e;
				}

				.collapse-content-right {
					color: #343434;
				}
			}
		}

		.amount {
			border-top: 2rpx solid #e8e8e8;
			font-size: 28rpx;
			color: #333;
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 20rpx 32rpx;
		}

		.handle {
			text-align: center;
			font-size: 28rpx;
			color: #157ef9;
			margin-top: 100rpx;
		}
	}
</style>